package org.jeecg.modules.wlhy.bill.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.paycenter.enums.BillTypeEnum;
import org.jeecg.modules.wlhy.bill.dto.HyBillDTO;
import org.jeecg.modules.wlhy.bill.dto.HyBillShippingNoteDTO;
import org.jeecg.modules.wlhy.bill.entity.HyBill;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.wlhy.hydriver.entity.HyDriver;
import org.jeecg.modules.wlhy.hydriverbank.entity.HyDriverBank;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;

public interface IHyBillService extends IService<HyBill> {
    IPage<HyBillDTO> getBillPageList(Page<HyBillDTO> page, QueryWrapper<HyBillDTO> queryWrapper);

    IPage<HyBillDTO> getReqSubFeeShippingPageList(Page<HyBillDTO> page, QueryWrapper<HyBillDTO> queryWrapper, String shippingStatus);

    List<HyBill> listByIdsForUpdate(Collection<? extends Serializable> ids);

    BigDecimal getShippingSubFee(String shippingId);

    IPage<HyBillDTO> getPlanFeeReqPageList(Page<HyBillDTO> page, QueryWrapper<HyBillDTO> queryWrapper, String billType);

    List<HyBill> getBillListByShippingIds(List<String> shippingids, String billType);
    List<HyBill> getBillListByShippingId(String shippingId);

    HyBill getBillByShippingId(String shippingId, String billType);

    boolean checkIsPay(String shippingId, String billType);

    boolean checkIsPay(HyBill bill);

    void deleteBillByShippNoteId(String shippingId, BillTypeEnum pay);
    void deleteBillListByShippNoteId(String shippingId);

    IPage<HyBillShippingNoteDTO> queryBillPageList(Page<HyBillShippingNoteDTO> page, QueryWrapper<HyBillDTO> queryWrapper);

    IPage<HyBillDTO> getPreFeeReqList(Page<HyBillDTO> page, QueryWrapper<HyBillDTO> queryWrapper);

    List<HyBillShippingNoteDTO> getBillShippingNoteList(QueryWrapper<HyBillDTO> queryWrapper);

    boolean updateStatusByShippingId(String shippingId, String status);

    HyDriverBank getDriverBankByDriverId(String driverId);
}
